#include "protosrvresp.h"

ProtoSrv* ProtoSrvResp::execute(ACE_SOCK_Stream &peer)
{
    ACE_OutputCDR cdr;
    if(ProtoSrvManager::getInstance()->encode(cdr,this)) {
	ssize_t sent_len = peer.send_n(cdr.begin());
        if(sent_len != (ssize_t)cdr.total_length())
	    return (ProtoSrv*)E_FAIL;
    }
    return 0;
}
